<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'test-question-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	
	<div class="row">
		<?php $this->widget('ext.ckeditor.CKEditorWidget',array(
		  "model"=>$model,                 # Data-Model
		  "attribute"=>'question_content',          # Attribute in the Data-Model
		  "defaultValue"=>$model->question_content,     # Optional

		  # Additional Parameter (Check http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html)
		  "config" => array(
			  "toolbar"=>"Full",
			  "toolbar_Full"=>array(
					array('Source','-','Save','NewPage','Preview','-','Templates'),
					array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'),
					array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
					'/',
					array('Bold','Italic','Underline','Strike','-','Subscript','Superscript'),
					array('NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
					array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
					array('BidiLtr', 'BidiRtl'),
					array('Link','Unlink','Anchor'),
					array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'),
					array('Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'),
					'/',
					array('Styles','Format','Font','FontSize'),
					array('TextColor','BGColor'),
					array('Maximize', 'ShowBlocks','-','About'),
				),
			  ),

		  #Optional address settings if you did not copy ckeditor on application root
		  "ckEditor"=>Yii::app()->basePath."/../ckeditor/ckeditor.php",
		  # Path to ckeditor.php
		  "ckBasePath"=>Yii::app()->baseUrl."/ckeditor/",
		  # Realtive Path to the Editor (from Web-Root)
		  ) ); ?>
	</div>
	
	<div class="row">
		<?php $this->widget('ext.ckeditor.CKEditorWidget',array(
		  "model"=>$model,                 # Data-Model
		  "attribute"=>'question_tutorial',          # Attribute in the Data-Model
		  "defaultValue"=>$model->question_tutorial,     # Optional

		  # Additional Parameter (Check http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html)
		  "config" => array(
			  "toolbar"=>"Full",
			  "toolbar_Full"=>array(
					array('Source','-','Save','NewPage','Preview','-','Templates'),
					array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'),
					array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
					'/',
					array('Bold','Italic','Underline','Strike','-','Subscript','Superscript'),
					array('NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
					array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
					array('BidiLtr', 'BidiRtl'),
					array('Link','Unlink','Anchor'),
					array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'),
					array('Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'),
					'/',
					array('Styles','Format','Font','FontSize'),
					array('TextColor','BGColor'),
					array('Maximize', 'ShowBlocks','-','About'),
				),
			  ),

		  #Optional address settings if you did not copy ckeditor on application root
		  "ckEditor"=>Yii::app()->basePath."/../ckeditor/ckeditor.php",
		  # Path to ckeditor.php
		  "ckBasePath"=>Yii::app()->baseUrl."/ckeditor/",
		  # Realtive Path to the Editor (from Web-Root)
		  ) ); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'form_id'); ?>
		<?php echo $form->dropDownList($model,'form_id', CHtml::listData(TestForm::model()->findAll(array('order'=>'form_id')), 'form_id', 'form_name')); ?>
		<?php echo $form->error($model,'form_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'level_id'); ?>
		<?php echo $form->dropDownList($model,'level_id', CHtml::listData(TestLevel::model()->findAll(array('order'=>'level_id')), 'level_id', 'level_name')); ?>
		<?php echo $form->error($model,'level_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->